<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no" />
		<title>首页</title>
		<link rel="stylesheet" type="text/css" href="../../css/aui.css" />
	 	<style>
		section{
			margin-bottom: 45px;
			padding-bottom: 45px;
			overflow: hidden
		}
		.fx-footer{
			border-top: 1px solid #DCDCDC;
			position: fixed;
			bottom: 0px;
			background: #FAFAFA;
			height: 45px;
			width: 100%;
		}
		.fx-footer-1 {
			width: 12%;
		}
		.fx-footer-1 img{
			width:45px;
			height: 45px;
		}
		.fx-footer-2{
			width: 88%;
			padding-right: 15px;
		}
		.fx-footer-2 div{
			width: 100%;
			height: 30px;
			line-height:28px;
			border:1px solid #DCDCDC;
			background: #fff;
			margin: 6px 0;
			color: #999999;
			padding: 0 5px;
			font-size: 0.6rem;
		}
		</style>
	</head>
	<body>
		<script id="fx-list" type="text/x-dot-template">
			{{ for(var i=0,len=it.data.length; i < len; i++) { }}
			{{? it.data[i].admin_id}}
			<div class="aui-chat-item aui-chat-left">
				<div class="aui-chat-media">
					<img src="../../image/guanliyuan.png" style="width: 2rem;height: 2rem;" />
				</div>
				<div class="aui-chat-inner">
					<div class="aui-chat-content">
						 <div class="aui-chat-name">管理员</div>
						<div class="aui-chat-arrow"></div>
						{{= it.data[i].content}}
						<div style="font-size: 0.5rem;color: #999;padding-top: 0.3rem;text-align: left;clear: both">
							{{= it.data[i].time}}
						</div>
					</div>
				</div>
			</div>
			{{??}}
			<div class="aui-chat-item aui-chat-right">
				<div class="aui-chat-media">
					<img id="ffxiangImgCache" ffxiang-src="{{= _user.img}}" src="../../image/touxiang.png" style="width: 2rem;height: 2rem;">
				</div>
				<div class="aui-chat-inner">
					<div class="aui-chat-content">
						 <div class="aui-chat-name">{{= it.data[i].username}}</div>
						<div class="aui-chat-arrow"></div>
						{{= it.data[i].content}}
						<div style="font-size: 0.5rem;color: #999;padding-top: 0.3rem;text-align: right;clear: both">
							{{= it.data[i].time}}
						</div>
					</div>
				</div>
			</div>
			{{?}}
			{{ } }}
		</script>
		<section class="aui-chat" id="fx-view">
		</section>
		<div id="here"></div>
		<div class="fx-footer">
			<div class="fx-footer-1 aui-pull-left">
				<img src="../../image/fx-yjfk.png" />
			</div>
			<div class="fx-footer-2 aui-pull-right" Tapmode onclick="_url({url:'member/jubaoAdd',title:'意见反馈',qian:1,fan:1});">
				<div>期待您的意见反馈</div>
			</div>
		</div>
	</body>
	<script type="text/javascript" src="../../script/zepto.min.js"></script>
	<script type="text/javascript" src="../../script/doT.js"></script>
	<script type="text/javascript" src="../../script/api.js"></script>
	<script type="text/javascript" src="../../script/ffxiang.js"></script>
	<script type="text/javascript">
		apiready = function() {
			// 下拉刷新
			_shangla(function(ret,err){
				_lists('api/member/yjfk/', 1, 1);
			},1)
			// 监听滚动
			api.addEventListener({
				name : 'scrolltobottom',
				extra : {
					threshold : threshold //设置距离底部多少距离时触发，默认值为0，数字类型
				}
			}, function(ret, err) {
				if (heigutgao == 1) {// heigutgao=1开启执行 0停止执行   防止连续滚动，等加载数据之后在进行滚动。
					pagenum += 1
					_lists('api/member/yjfk', pagenum);
					// 当数据写入成功  把 heigutgao 设置1
				}
			});
			api.addEventListener({
			    name: 'yejian'
			}, function(ret, err) {
				if(ret){
					_yejians();
				}
			});
			api.addEventListener({
				name : 'viewappear'
			}, function(ret, err) {
				api.refreshHeaderLoading();
			});
			 
		}
	</script>
</html>